/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.esink.tests;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Administrador
 */
public class Logging {

    public static void write(String text, boolean x) {
        File arq = new File("logging.txt");
        boolean statusArq;
        try {            
            FileWriter fileWriter = new FileWriter(arq, x);
            PrintWriter printWriter = new PrintWriter(fileWriter);
            printWriter.println(text);
            printWriter.flush();
            printWriter.close();

        } catch (IOException ex) {
            Logger.getLogger(Logging.class.getName()).log(Level.SEVERE, null, ex);
        }

    }
}
